#ifndef _VEC4_HPP
#define _VEC4_HPP

namespace phx
{

class vec4b
{
public:
	vec4b(unsigned char x = 0, unsigned char y = 0, unsigned char z = 0, unsigned char w = 0){this->x = x; this->y = y; this->z = z; this->w = w;}
	vec4b(const vec4b &other){x = other.x; y = other.y; z = other.z; w = other.w;}
	void operator=(const vec4b &other){x = other.x; y = other.y; z = other.z; w = other.w;}
	vec4b operator/(const unsigned char value){return vec4b(x / value, y / value, z / value, w / value);}
	void operator/=(const unsigned char value){x /= value; y /= value; z /= value; w /= value;}
	union{unsigned char x, r;};
	union{unsigned char y, g;};
	union{unsigned char z, b;};
	union{unsigned char w, a;};
};

class vec4i
{
public:
	vec4i(int x = 0, int y = 0, int z = 0, int w = 0){this->x = x; this->y = y; this->z = z; this->w = w;}
	vec4i(const vec4i &other){x = other.x; y = other.y; z = other.z; w = other.w;}
	void operator=(const vec4i &other){x = other.x; y = other.y; z = other.z; w = other.w;}
	vec4i operator/(const int value){return vec4i(x / value, y / value, z / value, w / value);}
	void operator/=(const int value){x /= value; y /= value; z /= value; w /= value;}
	union{int x, r;};
	union{int y, g;};
	union{int z, b;};
	union{int w, a;};
};

class vec4ui
{
public:
	vec4ui(unsigned int x = 0U, unsigned int y = 0U, unsigned int z = 0U, unsigned int w = 0U){this->x = x; this->y = y; this->z = z; this->w = w;}
	vec4ui(const vec4ui &other){x = other.x; y = other.y; z = other.z; w = other.w;}
	void operator=(const vec4ui &other){x = other.x; y = other.y; z = other.z; w = other.w;}
	vec4ui operator/(const unsigned int value){return vec4ui(x / value, y / value, z / value, w / value);}
	void operator/=(const unsigned int value){x /= value; y /= value; z /= value; w /= value;}
	union{unsigned int x, r;};
	union{unsigned int y, g;};
	union{unsigned int z, b;};
	union{unsigned int w, a;};
};

class vec4f
{
public:
	vec4f(float x = 0.0f, float y = 0.0f, float z = 0.0f, float w = 0.0f){this->x = x; this->y = y; this->z = z; this->w = w;}
	vec4f(const vec4f &other){x = other.x; y = other.y; z = other.z; w = other.w;}
	void operator=(const vec4f &other){x = other.x; y = other.y; z = other.z; w = other.w;}
	vec4f operator/(const float value){return vec4f(x / value, y / value, z / value, w / value);}
	void operator/=(const float value){x /= value; y /= value; z /= value; w /= value;}
	union{float x, r;};
	union{float y, g;};
	union{float z, b;};
	union{float w, a;};
};

class vec4d
{
public:
	vec4d(double x = 0.0, double y = 0.0, double z = 0.0, double w = 0.0){this->x = x; this->y = y; this->z = z; this->w = w;}
	vec4d(const vec4d &other){x = other.x; y = other.y; z = other.z; w = other.w;}
	void operator=(const vec4d &other){x = other.x; y = other.y; z = other.z; w = other.w;}
	vec4d operator/(const double value){return vec4d(x / value, y / value, z / value, w / value);}
	void operator/=(const double value){x /= value; y /= value; z /= value; w /= value;}
	union{double x, r;};
	union{double y, g;};
	union{double z, b;};
	union{double w, a;};
};

class vec4l
{
public:
	vec4l(long x = 0L, long y = 0L, long z = 0L, long w = 0L){this->x = x; this->y = y; this->z = z; this->w = w;}
	vec4l(const vec4l &other){x = other.x; y = other.y; z = other.z; w = other.w;}
	void operator=(const vec4l &other){x = other.x; y = other.y; z = other.z; w = other.w;}
	vec4l operator/(const long value){return vec4l(x / value, y / value, z / value, w / value);}
	void operator/=(const long value){x /= value; y /= value; z /= value; w /= value;}
	union{long x, r;};
	union{long y, g;};
	union{long z, b;};
	union{long w, a;};
};

class vec4ul
{
public:
	vec4ul(unsigned long x = 0UL, unsigned long y = 0UL, unsigned long z = 0UL, unsigned long w = 0UL){this->x = x; this->y = y; this->z = z; this->w = w;}
	vec4ul(const vec4ul &other){x = other.x; y = other.y; z = other.z; w = other.w;}
	void operator=(const vec4ul &other){x = other.x; y = other.y; z = other.z; w = other.w;}
	vec4ul operator/(const unsigned long value){return vec4ul(x / value, y / value, z / value, w / value);}
	void operator/=(const unsigned long value){x /= value; y /= value; z /= value; w /= value;}
	union{unsigned long x, r;};
	union{unsigned long y, g;};
	union{unsigned long z, b;};
	union{unsigned long w, a;};
};

}

#endif